<?php
/* 
* @Author: Jerry-chen
* @Date:   2014-07-21 14:23:51
* @Last Modified time: 2014-07-21 14:25:28
* @Last Modified by: Jerry-chen<uranusbill@163.com>
* @ Copyright (c) 2014 http://www.cooldreamer.com All rightsreserved.
*/

class SpaddressModel extends Model
{
	
	//指定表
	public $table = 'spaddress';
	/**
	 * [add 插入数据]
	 */
	public function add_($data=null)
	{
		$result = $this->add($data);
		//返回增加的主键ID
		return $result;
	}
	/**
	 * [get_all 获是所有数据]
	 * @param  [type] $where [description]
	 * @return [type]        [description]
	 */
	public function get_all($where=null){

		return $this->where($where)->all();
	}
	/**
	 * [get_one 取得一个数据]
	 * @return [type] [description]
	 */
	public function get_one($where=null,$field=null)
	{
		return $this->where($where)->field($field)->find();
	}
	/**
	 * [del_ 删除数据]
	 * @return [type] [description]
	 */
	public function del_($where)
	{
		return $this->where($where)->del();
	}
}